var assert = require('assert');
var should = require('should');
var util = require('util');
var zlib = require('zlib');
var _ = require('lodash');
var rivalService = require('../../app/services/rivalService');
var config = require('../config');
var dataApi = require('../../app/libs/dataApi');
var playerManager = require('../../app/libs/playerManager');

suite('测试rivalService', function () {
    suite('getRandomRivalUid', function () {
        test('获取随机对手', function (done) {
            rivalService.getRandomRivalRoleId(config.role_id, [], function (err, rival_uid) {
                //console.log(rival_uid);
                done();
            });
        });
    });

    suite('getInfo', function () {
        test('获取对手信息', function (done) {
            var player_manager = new playerManager(config.role_id);
            player_manager.getModel(['role', 'battle', 'build', 'soldier'], function () {
                rivalService.getInfo(player_manager, function (err, rival_info) {
                    //console.log(rival_info);
                    done();
                });
            });
        });
    });
});
